home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-01-06 | 1.5 KB | 73 lines | [TEXT/MPS ] |
- TITLE 'Timeout for serial IO'
- BLANKS ON
- CASE ON
- String Pascal
-
- PRINT OFF
- INCLUDE 'Traps.a'
- INCLUDE 'ToolEqu.a'
- INCLUDE 'QuickEqu.a'
- INCLUDE 'SysEqu.a'
- INCLUDE 'SysErr.a'
- INCLUDE 'Quickdraw.inc'
- INCLUDE 'TimeEqu.a'
- LOAD 'ProgStrucMacs.d'
- LOAD 'FlowCtlMacs.d'
- PRINT ON
-
- ParamBlockSize equ 108
- DCEPtr equ csParam+6
-
- DStore Record 0
- WriteUnit DS.W 1
- ReadUnit DS.W 1
- TimeCount DS.L 1
- KillBlock DS.L 1
- KillTask DS.L 1
- IncomingLength DS.B 1
- IncomingString DS.B 9
- Align 2
- TableOffset equ *
- TableLen DS.W 1
- Table DS.W 5
- ENDR
-
- EvRecord Record 0
- myEvent DS.L EventRecord ; Current event info
- ENDR
-
- Export Procedure TimeOutInstall ( KillTask:L , KillPtr:L )
- Begin Save=A0-A2
-
-
- Call _GetNamedResource:L ( #'TMMR':L , #'KillRoutine':A ),A1
- CMPA #0,A1
- If# NE Then.S
- MOVE.L (A1),A1
- MOVE.L KillTask(FP),A0
- MOVE.L KillPtr(FP),(A1)
- LEA 4(A1),A1
- MOVE.L A1,tmAddr(A0)
- _InsTime
- EndIf#
- Return
-
- ENDP
-
- * Serial Complete - This routine is the ioCompletion routine for the asynchronously serial
- * IO calls from the pump driver. On completion, the routine posts an app1Evt with the message
- * the parameter block of the completed serial call.
-
- Export Procedure SerialComplete
- Begin Save=A5
-
- MOVE.L CurrentA5,A5
- MOVE.L A0,D0
- MOVE.W #app1Evt,A0
- _PostEvent
-
- Return
- ENDP
-
- END
-